package com.skt.manage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.skt.manage.mapper.AnnouncementsMapper;
import com.skt.manage.domain.Announcements;
import com.skt.manage.service.IAnnouncementsService;

/**
 * 公告新闻管理Service业务层处理
 * 
 * @author ffbaby
 * @date 2025-02-25
 */
@Service
public class AnnouncementsServiceImpl implements IAnnouncementsService 
{
    @Autowired
    private AnnouncementsMapper announcementsMapper;

    /**
     * 查询公告新闻管理
     * 
     * @param announcementId 公告新闻管理主键
     * @return 公告新闻管理
     */
    @Override
    public Announcements selectAnnouncementsByAnnouncementId(Long announcementId)
    {
        return announcementsMapper.selectAnnouncementsByAnnouncementId(announcementId);
    }

    /**
     * 查询公告新闻管理列表
     * 
     * @param announcements 公告新闻管理
     * @return 公告新闻管理
     */
    @Override
    public List<Announcements> selectAnnouncementsList(Announcements announcements)
    {
        return announcementsMapper.selectAnnouncementsList(announcements);
    }

    /**
     * 新增公告新闻管理
     * 
     * @param announcements 公告新闻管理
     * @return 结果
     */
    @Override
    public int insertAnnouncements(Announcements announcements)
    {
        return announcementsMapper.insertAnnouncements(announcements);
    }

    /**
     * 修改公告新闻管理
     * 
     * @param announcements 公告新闻管理
     * @return 结果
     */
    @Override
    public int updateAnnouncements(Announcements announcements)
    {
        return announcementsMapper.updateAnnouncements(announcements);
    }

    /**
     * 批量删除公告新闻管理
     * 
     * @param announcementIds 需要删除的公告新闻管理主键
     * @return 结果
     */
    @Override
    public int deleteAnnouncementsByAnnouncementIds(Long[] announcementIds)
    {
        return announcementsMapper.deleteAnnouncementsByAnnouncementIds(announcementIds);
    }

    /**
     * 删除公告新闻管理信息
     * 
     * @param announcementId 公告新闻管理主键
     * @return 结果
     */
    @Override
    public int deleteAnnouncementsByAnnouncementId(Long announcementId)
    {
        return announcementsMapper.deleteAnnouncementsByAnnouncementId(announcementId);
    }
}
